import type { KnowledgePage, KnowledgeParams, PageParams, DoctorPage, FollowType } from '@/types/consult'
import { request } from '@/utils/request'

// 密码
export const getKnowledgePage = (params: KnowledgeParams) =>
    request<KnowledgePage>('/patient/home/knowledge', 'GET', params)
// list
export const getDoctorPage = (params: PageParams) =>
    request<DoctorPage>('/home/page/doc', 'GET', params)
// 关注与取消
export const followOrUnfollow = (id: string, type: FollowType = 'doc') =>
    request('/like', 'POST', { id, type })
